<template>
	<view class="u-demo">
		<u-subsection @change="change"  :current="current" :list="['普通号', '专家']"></u-subsection>
		<uni-group v-show="current == 0" title="可挂号信息">
			<uni-card >
				<view class="u-flex" style="justify-content: space-between;">
					<view style="width: 70%;">2020-9-21 周一下午 14:00 {{name}}</view>
					<button type="primary" @click="toguahao" >预约</button>
				</view>
			</uni-card>
		</uni-group>
		<uni-group v-show="current == 1" >
			<uni-card>
				<view class="u-demo-title">暂无数据</view>
			</uni-card>
		</uni-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current:"",
				name:''
			}
		},
		onLoad(options) {
			this.name = options.name
		},
		methods: {
			toguahao(){
				uni.navigateTo({
					url:'yuyue?name='+this.name
				})
			},
			change(e){
				console.log(e)
				this.current = e
			}
		}
	}
</script>

<style>

</style>
